package models

import (
	"time"
)

/*
 +----------------------------------------------------------------------
 + Title        : AccountRole
 + Author       : huwl
 + Version      : 1.0.0
 + Initial-Time : 2018-01-06
 + Last-time    : 这个文件最后修改的时间 + 修改人的名称
 + Desc         : 账户与角色模型
 +----------------------------------------------------------------------
*/

type AccountRole struct {
	Id         uint32    `gorm:"primaryKey;autoIncrement" json:"id"`
	AccountId  uint16    `json:"account_id"`
	RoleId     uint16    `json:"role_id"`
	CreateTime time.Time `gorm:"autoCreateTime" json:"create_time"`
	Base       `gorm:"-"`
}

//设置表名
func (AccountRole) TableName() string {
	return "mall_account_role"
}
